/*
 * This file is part of the Android Dimensions Editor Project: http://code.google.com/p/android-dimension-editor/
 *  
 * Copyright (c) 2013 Rick Falck
 *  
 * This code is licensed under the terms of the Apache License Version 2.0.
 * You may use this code according to the license.
 *
 * The terms of the license can be found in the root directory of this project's repository as well as at:
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *  
 * Unless required by applicable law or agreed to in writing, software
 * distributed under these Licenses is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See each License for the specific language governing permissions and
 * limitations under that License.
 */

package model;

/**
 * <b>public class ItemComment extends ItemName</b>
 * <p>
 * This class encapsulates the TextView of one item in one dimens file
 * 
 * @author Rick Falck
 */

import javafx.geometry.Pos;

public class ItemName extends ItemTextField implements Comparable<ItemName> {
	private ItemValue mMyValue;
	public ItemName(String name) {
		super(name);
		setAlignment(Pos.CENTER_LEFT);
	}	
	
	@Override
	protected String getMyStyle() {
		return "itemname";		
	}

	@Override
	public int compareTo(ItemName other) {
		return this.mOriginalString.compareToIgnoreCase(other.mOriginalString);
	}
	
	@Override
	public int hashCode() {
		return mOriginalString.hashCode();
	}

	public ItemValue getMyValue() {
		return mMyValue;
	}

	public void setMyValue(ItemValue myValue) {
		mMyValue = myValue;
	}
	
	public boolean isComment() {
		return false;
	}
}
